package com.hdaccp.foodsales.controller;


import com.hdaccp.foodsales.entity.Jinhuo;
import com.hdaccp.foodsales.entity.Xiaoshou;
import com.hdaccp.foodsales.service.JinxiaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/jinxiao")
@Scope("prototype")
public class jinxiaoController {

    @Autowired
    private JinxiaoService jinxiaoService;




    @RequestMapping("/jinhuo")
    @ResponseBody
    public List<Jinhuo> jinxiao(String yi, String er){

        return jinxiaoService.jinhuo(yi,er);
    }

    @RequestMapping("/xiaoshou")
    @ResponseBody
    public List<Xiaoshou> xiaoshou(String yi, String er){


        return jinxiaoService.xiaoshou(yi,er) ;
    }



}
